package stockblaster.client;

import stockblaster.gen.R;
import android.app.Activity;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.View;

public class ArdoProfileActivity extends Activity {
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ardo_profile);
	}
	
	@Override
	public void onBackPressed() {
		MethodHelper.switch_activity(this, CampaignSelectActivity.class, false);
	}

	public void profilePage(View v) {
		//TODO uncomment this part
		//if (!Users.doesUserExist("Januardo Jankowski")) {
			CurrentUser.createNewUser("Januardo Jankowski", 25000.00);
		//} else {
			//CurrentUser.setCurrentUser("Januardo Jankowski");
		//}
		initCompanies();
		MethodHelper.switch_activity(this, MainPageActivity.class, false);
		//MethodHelper
				//.switch_activity(this, ArdoProfilePageActivity.class, false);
	}
	
	private void initCompanies() {
       	Companies.initCompanies(); //initialize all the companies info but the info itself
       	Resources r = getResources();
           Companies.setCompanyInfo("Free Inc.", r.getString(R.string.free_inc_info));
           Companies.setCompanyInfo("Earth Microsystems", r.getString(R.string.earth_microsystems_info));
           Companies.setCompanyInfo("Noxxe Mobil", r.getString(R.string.noxxe_mobile_info));
           Companies.setCompanyInfo("Nanosoft", r.getString(R.string.nanosoft_info));
           Companies.setCompanyInfo("Waterworks", r.getString(R.string.waterworks_info));
       }
}
